import kotlinx.coroutines.*

fun main() {

    // 创建协程
    runBlocking {
        val result = getData()
        println("Result: $result")
    }
}

suspend fun getData(): String {
    delay(2000) // 模拟耗时操作
    return "Data from a long-running task"
}